export {
    PagesBtns
}
function PagesBtns(pageSize, btnSize, total) {
    let self = this;
    //二维数组 分组存放页码数据（一组6个）
    this.all = []
    //一共几组按钮 6
console.log(Math.ceil(total / pageSize))
    this.length = Math.ceil(total / pageSize);
    this.arrLength = (parseInt(this.length / btnSize) + 1);
    console.log(this.length)
    console.log(this.arrLength)
    // console.log(this.arrLength)
    //临时数组 存放所有页码
    let tempArr = [];
    //存入所有页码
    for (let index = 0; index < this.length; index++) {
        tempArr.push(index + 1)
    }
    //获取all数组
    let getall = function (arr) {
        if (arr.length >= btnSize) {
            let newArr = arr.splice(0, btnSize);
            self.all.push(newArr)
            getall(arr)
        } else {
            self.all.push(arr)
        }

    }
    getall(tempArr)
    // console.log(this.all)
    // console.log(last)

}